package com.lmt_15;

public class MyRunable {
    public static void main(String[] args) {
         new Thread(new Runnable() {
             @Override
             public void run() {
                     for (int i = 0; i < 5; i ++){
                         System.out.println("子线程1输出"+ i);

                 }
             }
         }).start();

        for (int i = 0; i < 5; i++) {
            System.out.println("主线程在执行"+i);
        }
        new Thread(()-> {
                for (int i = 0; i < 5; i ++){
                    System.out.println("子线程2输出"+ i);
                }
        }).start();
    }
}
